package com.hzy.so.service;

import com.hzy.common.entities.CommonResult;
import com.hzy.sample.entities.Payment;
import com.hzy.so.service.impl.PaymentServiceFallback;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;

/**
 * @author hzy
 * @since 2022/3/5 22:02
 */
@Component
@FeignClient(value = "sentinel-openfeign-payment", fallback = PaymentServiceFallback.class)
public interface PaymentService {

    @RequestMapping("/payment/load/{id}")
    CommonResult<Payment> load(@PathVariable("id") String id);

}
